package com.yfp.device.mapper;

import com.yfp.device.domain.ApkVersion;
import com.yfp.device.domain.ApkVersionExample;

import java.util.List;

import org.apache.ibatis.annotations.Param;

public interface ApkVersionMapper {
    long countByExample(ApkVersionExample example);

    int deleteByExample(ApkVersionExample example);

    int deleteByPrimaryKey(String versionNo);

    int insert(ApkVersion record);

    int insertSelective(ApkVersion record);

    List<ApkVersion> selectByExample(ApkVersionExample example);

    ApkVersion selectByPrimaryKey(String versionNo);

    int updateByExampleSelective(@Param("record") ApkVersion record, @Param("example") ApkVersionExample example);

    int updateByExample(@Param("record") ApkVersion record, @Param("example") ApkVersionExample example);

    int updateByPrimaryKeySelective(ApkVersion record);

    int updateByPrimaryKey(ApkVersion record);

    /**
     * 通过设备号获取最新版本
     *
     * @param machineSn 设备编号
     * @return 版本
     */
    ApkVersion selectByMachineSn(@Param("machineSn") String machineSn);
}